import koaRouter from 'koa-router';
import Koa from 'koa'
import { APP } from 'mz-botjs'
import { makeEvent } from '../model/index.js';

const router = new koaRouter({ prefix: '/message' });
router.post('/receive', async (ctx: Koa.Context) => {
    const { message } = ctx.request.body as any;
    APP.response(makeEvent(message))
})